#pragma once
#include "logsink.h"
#include "loghandler.h"
#include <string>

namespace gloox
{
class DebugHandler : public LogHandler
{
public:
	static LogHandler* logHandler();
	static void deleteHanlder();
	virtual void handleLog(LogLevel level, LogArea area, const std::string& message);
protected:
	DebugHandler(void);
	~DebugHandler(void);
	static LogHandler*	m_logHandler;
};

#define WarningLog(message) DebugHandler::logHandler()->handleLog(LogLevelWarning, LogAreaAll, message);
#define ErrorLog(message) DebugHandler::logHandler()->handleLog(LogLevelError, LogAreaAll, message);
#define DebugLog(message) DebugHandler::logHandler()->handleLog(LogLevelDebug, LogAreaAll, message);

}